import request from '@/utils/request'

// 获取销售前几的商品
export const getSalesRanking = (start, end, topValue) => request.get(`/api/order-service/report/skuTop/${topValue}/${start}/${end}`)

// 获取当时工单汇总信息
export const getCurrentWork = (start, end) => request.get(`/api/task-service/task/taskReportInfo/${start} 00:00:00/${end} 23:59:59`)

// 获取一定时间范围内收入
export const getOrderAmount = (data) => request.get('/api/order-service/report/orderAmount', {
  params: {
    ...data
  }
})

// 获取一定时间范围内订单
export const getOrderCount = (data) => request.get('/api/order-service/report/orderCount', {
  params: {
    ...data
  }
})

// 销售额折线图数据
export const getAmountCollect = (collectType, start, end) => request.get(`/api/order-service/report/amountCollect/${collectType}/${start}/${end}`)

// 销售额趋势图数据
export const getRegionCollect = (start, end) => request.get(`/api/order-service/report/regionCollect/${start}/${end}`)

// 合作商点位汇总统计
export const getNodeCollect = () => request.get('/api/vm-service/node/nodeCollect')

// 获取点位总数
export const getNodeCount = () => request.get('/api/vm-service/node/count')

// 获取合作商总数
export const getPartnerCount = () => request.get('/api/user-service/partner/count')
